<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Handle events</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.event-base-loop" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">event_base_loop</h1>
  <p class="verinfo">(PECL libevent &gt;= 0.0.1)</p><p class="refpurpose"><span class="refname">event_base_loop</span> &mdash; <span class="dc-title">Handle events</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.event-base-loop-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>event_base_loop</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$event_base</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>
  ] ) : <span class="type">int</span></div>

  <p class="para rdfs-comment">
   Starts event loop for the specified event base.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.event-base-loop-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">event_base</code></dt>

     <dd>

      <p class="para">
       Valid event base resource.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">flags</code></dt>

     <dd>

      <p class="para">
       Optional parameter, which can take any combination of 
       <strong><code>EVLOOP_ONCE</code></strong> and <strong><code>EVLOOP_NONBLOCK</code></strong>. 
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.event-base-loop-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <span class="function"><strong>event_base_loop()</strong></span> returns 0 on success, -1 on error and
   1 if no events were registered.
  </p>
 </div>


</div></div></div></body></html>